home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Destroying Proxy Frames
- Sent: 7/9/96 1:08 PM
- Received: 7/9/96 12:21 PM
- From: Scott Anderson, scotta@aw.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
-
- >What's concerning me about your fix is that if fAttached is true then
- >inLimbo should be false (an attached embedded frame is not inLimbo). This
- >means that you never execute the first if statement and never remove
- >unused embedded frames.
-
- D'oh.
-
- Fortunately I found a solution to the problem that doesn't involve that
- little hack.
-
- >How do you detach embedded frames? is it the result of an undoable action
- >(like cut or drag/move)?
-
- My part is a nav-aware part that can be opened into a navigator part. I
- detach my parts embedded frames when my part is embedded in the navigator
- and then a new part is swapped into the navigator. At that point my
- part's display frame is used to display the new part via a ChangePart()
- call so I detach my embedded frames to prevent them from being destroyed.
-
- The problem of removing vs. releasing the embedded frames came up during
- my attempts at replacing Cyberdog's standard navigator part. When I was
- closing my navigator I was simply purging the "cyber draft" that the
- Cyberdog session maintains. This draft contained all of the parts in the
- history list of the navigator. I found the problem tracing through the
- OpenDoc source code. In CMDraftPurge() there is an iterator that got out
- of synch when my nav-aware part got removed from the draft and destroyed
- it in turn removed its embedded frame from the draft. This action
- incrimented the hash table's seed but didn't incriment the iterator's
- seed. It is so very helpful to have the OpenDoc source code in such
- situations. I wish that the powers that be would realize that Cyberdog
- development could be escalated with the availability of the source.
-
- My solution was to remove each of the parts in the history list before
- purging the draft of the other persistant objects that Cyberdog maintains
- which is what it seems that the standard navigator does.
-
- -Scott
-